<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/contact.css" />
<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - Login or Register';
$this->breadcrumbs=array(
	'Login or Register',
);
?>

<div class='row contact-header '>
 <span class='stitle' >Register an account now and get special discounts </span>
</div>


<?php if(Yii::app()->user->hasFlash('register')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('register'); ?>
</div>

<?php else: ?>

<div class='contact-form'>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
 	
	<?php echo $form->errorSummary($model); ?>

	<div class='pcontent'>

<div class='left'>
	<div class="row">

		<?php echo $form->labelEx($model,'username'); ?>

		<?php echo $form->textField($model,'username',array('size'=>50,'maxlength'=>50)); ?>

		<?php echo $form->error($model,'username'); ?>

	</div>

	<div class="row">

		<?php echo $form->labelEx($model,'password'); ?>

		<?php echo $form->passwordField($model,'password',array('size'=>60,'maxlength'=>100)); ?>

		<?php echo $form->error($model,'password'); ?>

	</div>

	

	<div class="row">

		<?php echo $form->labelEx($model,'confirm'); ?>

		<?php echo $form->passwordField($model,'confirm',array('size'=>60,'maxlength'=>100)); ?>

		<?php echo $form->error($model,'confirm'); ?>

	</div>



	<div class="row">

		<?php echo $form->labelEx($model,'email'); ?>

		<?php echo $form->emailField($model,'email'); ?>

		<?php echo $form->error($model,'email'); ?>

	</div>
	
	<div class="row">
		<?php 
		echo $form->labelEx($model,'quocgia'); 
		$this->widget('zii.widgets.jui.CJuiAutoComplete', array(

            'model'=>$model,

    		'attribute'=>'quocgia',

            'sourceUrl' => array('quocgia/autocomplete'),

            'options' => array(

                'showAnim' => 'fold',

            ),

            'htmlOptions' => array(

               // 'style'=>'height: 16px; width: 300px;',

             ),

        ));
	    echo $form->error($model,'quocgia');
		?>
	</div> 

</div>

<div class='right'>

	<div class="row">

		<?php echo $form->labelEx($model,'ho'); ?>

		<?php echo $form->textField($model,'ho'); ?>

		<?php echo $form->error($model,'ho'); ?>

	</div>

	<div class="row">

		<?php echo $form->labelEx($model,'ten'); ?>

		<?php echo $form->textField($model,'ten'); ?>

		<?php echo $form->error($model,'ten'); ?>

	</div>

	<div class="row">

		<?php echo $form->labelEx($model,'dienthoai'); ?>

		<?php echo $form->textField($model,'dienthoai',array('rows'=>6, 'cols'=>50)); ?>

		<?php echo $form->error($model,'dienthoai'); ?>

	</div>

	

	<?php if(CCaptcha::checkRequirements()): ?>

	<div class="row" style='padding-top: 17px; padding-bottom: 5px;'>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		</div>
		<div class="row">
		<?php echo $form->textField($model,'verifyCode'); ?>
		<?php echo $form->error($model,'verifyCode'); ?>

	</div>

	<?php endif; ?>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit', array('class'=>'button orange')); ?>
	</div>
</div>	
	

	

</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
</div>
<?php endif; ?>